﻿using System.Threading;
using Microsoft.AspNetCore.SignalR.Client;
using Quantum.Core;

namespace Quantum.SignalR
{
    public class Publisher : SignalRConnection, IPublishBehavior
    {
        public void Publish(string message)
        {
            CancellationToken cancellationToken = new CancellationToken(false);
            Connection.InvokeAsync("Publish", message, cancellationToken).GetAwaiter().GetResult();
        }
    }
}
